package com.mszlu.blog.utils;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 * User: SJP
 * Date: 2022/3/5
 * Time: 15:36
 *
 * @author sjp
 * Description: No Description
 */

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

/**
 * HttpServletRequest
 *
 */
public class HttpContextUtils {

    public static HttpServletRequest getHttpServletRequest() {
        //return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
    }

}


